<?php
class Pageley_Gateway_Database_AliasColumnNameGenerator extends Pageley_Gateway_Database_SimpleColumnNameGenerator {
   
    private $aliasPrefix;
    
    public function __construct($type, $tableName, $tableAlias = null, $delimiter = "", $aliasPrefix = "") {
        parent::__construct($type, $tableName, $tableAlias, $delimiter);
        $this->aliasPrefix = $aliasPrefix;
    }
    
    public function formatColumnName($columnName) {
        return parent::formatColumnName($columnName) . " AS " 
            . $this->getDelimiter() . $this->aliasPrefix . $columnName . $this->getDelimiter();
    }
}
